const ws = require("ws");
class WS extends require('./protocol'){
    constructor(options){
        super(options);
        !!options&&Object.assign(this,options);
    }
    listen(){
        let server=new ws.Server({
            port: this.port
        });
        server.on('connection', function(socket) {
            socket.on('message',(data)=>{
               console.log(data);
            });
        });
        //server.listen(this.port);
    }
}

module.exports=WS;